import request from "@/utils/request";

const api_name = "/admin/hosp/hospital";

export const getPageList = (
	page: number,
	limit: number,
	searchObj: any
): any => {
	return request({
		url: `${api_name}/${page}/${limit}`,
		method: "get",
		params: searchObj,
	});
};

export const updateStatus = (id: number, status: number) => {
	return request({
		url: `${api_name}/updateStatus/${id}/${status}`,
		method: "get",
	});
};

export const getById = (id: string): any => {
	return request({
		url: `${api_name}/show/${id}`,
		method: "get",
	});
};

export const getByHosname = (hosname: string) => {
	return request({
		url: `/api/hosp/hospital/findByHosname/${hosname}`,
		method: "get",
	});
};
